package com.markedquilt.homepage.client;
/*
 * PackageName: com.markedquilt.homepage.client
 * Author:   coke
 * Date:     Created in 2020/12/27 19:16
 * Description:
 * History:
 * <author>        <time>             <version>          <desc>
 * 作者姓名         修改时间            版本号              描述
 * coke           2020/12/27 19:16     1.0
 */

import com.markedquilt.homepage.CourseInfo;
import com.markedquilt.homepage.CourseInfosRequest;
import org.springframework.stereotype.Component;

import java.util.Collections;
import java.util.List;

/**
 * @author ZhangKe
 * @Description 熔断降级策略
 *              因为熔断降级中方法名必须和要熔断的方法方法名相同，所以直接实现接口
 * @date 2020/12/27 19:16.
 */
@Component
public class CourseClientHystrix implements CourseClient {

    @Override
    public CourseInfo getCourseInfo(Long id) {
        return CourseInfo.invalid();
    }

    @Override
    public List<CourseInfo> getCourseInfos(CourseInfosRequest request) {
        return Collections.emptyList();
    }
}
